/* 日期格式化 */
export function formatTime(time, format = '') {
    let str = '';

    if (!time || time == 0) {
        str = '';
    } else {
        let date = new Date(Number(time));
        let y = date.getFullYear();
        let m = (date.getMonth() + 1).toString().padStart(2, '0');
        let d = date.getDate().toString().padStart(2, '0');

        str = y + '-' + m + '-' + d;
    }

    return str;
}
